package L1;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class _039 {
    /**
     * 古风排版
     */
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        int N = Integer.valueOf(reader.readLine());
        String s = reader.readLine();
        int M = (s.length()%N)==0?s.length()/N:(s.length()/N)+1;
        char[][] n = new char[N][M];
        int num = 0;
        for (int i=M-1;i>=0;i--){
            for (int j=0;j<N;j++){
                if (num>=s.length()){
                    n[j][i]=' ';
                    num++;
                }else if (num>=(N*M)){
                    n[j][i]=' ';
                    break;
                }else {
                    n[j][i]=s.charAt(num++);
                }
            }
        }
        for (int i=0;i<N;i++){
            for (int j=0;j<M;j++){
                System.out.print(n[i][j]);
            }
            System.out.println();
        }
    }
}
